<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>SFML - Simple and Fast Multimedia Library</title>
        <meta http-equiv="Content-Type" content="text/html;"/>
        <meta charset="utf-8"/>
        <!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
        <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript" src="dynsections.js"></script>
        <link rel="stylesheet" type="text/css" href="search/search.css" />
        <link rel="stylesheet" type="text/css" href="searchOverrides.css" />
        <script type="text/javascript" src="search/searchdata.js"></script>
        <script type="text/javascript" src="search/search.js"></script>
        <script type="text/javascript">
        /* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
          $(document).ready(function() { init_search(); });
        /* @license-end */
        </script>
    </head>
    <body>
        <div id="banner-container">
            <div id="banner">
                <span id="sfml">SFML 2.6.1</span>
            </div>
        </div>
        <div id="content">
<!-- Generated by Doxygen 1.9.7 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <span id="MSearchSelect"                onmouseover="return searchBox.OnSearchSelectShow()"                onmouseout="return searchBox.OnSearchSelectHide()">&#160;</span>
          <input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1NonCopyable.html">NonCopyable</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="classsf_1_1NonCopyable-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">sf::NonCopyable Class Reference<div class="ingroups"><a class="el" href="group__system.html">System module</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Utility class that makes any derived class non-copyable.  
 <a href="classsf_1_1NonCopyable.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="NonCopyable_8hpp_source.html">SFML/System/NonCopyable.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::NonCopyable:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classsf_1_1NonCopyable.png" usemap="#sf::NonCopyable_map" alt=""/>
  <map id="sf::NonCopyable_map" name="sf::NonCopyable_map">
<area href="classsf_1_1Context.html" title="Class holding a valid drawing context." alt="sf::Context" shape="rect" coords="231,56,452,80"/>
<area href="classsf_1_1Cursor.html" title="Cursor defines the appearance of a system cursor." alt="sf::Cursor" shape="rect" coords="231,112,452,136"/>
<area href="classsf_1_1FileInputStream.html" title="Implementation of input stream based on a file." alt="sf::FileInputStream" shape="rect" coords="231,168,452,192"/>
<area href="classsf_1_1Ftp.html" title="A FTP client." alt="sf::Ftp" shape="rect" coords="231,224,452,248"/>
<area href="classsf_1_1GlResource_1_1TransientContextLock.html" title="RAII helper class to temporarily lock an available context for use." alt="sf::GlResource::TransientContextLock" shape="rect" coords="231,280,452,304"/>
<area href="classsf_1_1Http.html" title="A HTTP client." alt="sf::Http" shape="rect" coords="231,336,452,360"/>
<area href="classsf_1_1InputSoundFile.html" title="Provide read access to sound files." alt="sf::InputSoundFile" shape="rect" coords="231,392,452,416"/>
<area href="classsf_1_1Lock.html" title="Automatic wrapper for locking and unlocking mutexes." alt="sf::Lock" shape="rect" coords="231,448,452,472"/>
<area href="classsf_1_1Mutex.html" title="Blocks concurrent access to shared resources from multiple threads." alt="sf::Mutex" shape="rect" coords="231,504,452,528"/>
<area href="classsf_1_1OutputSoundFile.html" title="Provide write access to sound files." alt="sf::OutputSoundFile" shape="rect" coords="231,560,452,584"/>
<area href="classsf_1_1RenderTarget.html" title="Base class for all render targets (window, texture, ...)" alt="sf::RenderTarget" shape="rect" coords="231,616,452,640"/>
<area href="classsf_1_1Shader.html" title="Shader class (vertex, geometry and fragment)" alt="sf::Shader" shape="rect" coords="231,672,452,696"/>
<area href="classsf_1_1Socket.html" title="Base class for all the socket types." alt="sf::Socket" shape="rect" coords="231,728,452,752"/>
<area href="classsf_1_1Thread.html" title="Utility class to manipulate threads." alt="sf::Thread" shape="rect" coords="231,784,452,808"/>
<area href="classsf_1_1ThreadLocal.html" title="Defines variables with thread-local storage." alt="sf::ThreadLocal" shape="rect" coords="231,840,452,864"/>
<area href="classsf_1_1WindowBase.html" title="Window that serves as a base for other windows." alt="sf::WindowBase" shape="rect" coords="231,896,452,920"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a2110add170580fdb946f887719da6860"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1NonCopyable.html#a2110add170580fdb946f887719da6860">NonCopyable</a> ()</td></tr>
<tr class="memdesc:a2110add170580fdb946f887719da6860"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <br /></td></tr>
<tr class="separator:a2110add170580fdb946f887719da6860"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8274ffbf46014f5f7f364befb52c7728"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1NonCopyable.html#a8274ffbf46014f5f7f364befb52c7728">~NonCopyable</a> ()</td></tr>
<tr class="memdesc:a8274ffbf46014f5f7f364befb52c7728"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <br /></td></tr>
<tr class="separator:a8274ffbf46014f5f7f364befb52c7728"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Utility class that makes any derived class non-copyable. </p>
<p>This class makes its instances non-copyable, by explicitly disabling its copy constructor and its assignment operator.</p>
<p>To create a non-copyable class, simply inherit from <a class="el" href="classsf_1_1NonCopyable.html" title="Utility class that makes any derived class non-copyable.">sf::NonCopyable</a>.</p>
<p>The type of inheritance (public or private) doesn't matter, the copy constructor and assignment operator are declared private in <a class="el" href="classsf_1_1NonCopyable.html" title="Utility class that makes any derived class non-copyable.">sf::NonCopyable</a> so they will end up being inaccessible in both cases. Thus you can use a shorter syntax for inheriting from it (see below).</p>
<p>Usage example: </p><div class="fragment"><div class="line"><span class="keyword">class </span>MyNonCopyableClass : <a class="code hl_class" href="classsf_1_1NonCopyable.html">sf::NonCopyable</a></div>
<div class="line">{</div>
<div class="line">    ...</div>
<div class="line">};</div>
<div class="ttc" id="aclasssf_1_1NonCopyable_html"><div class="ttname"><a href="classsf_1_1NonCopyable.html">sf::NonCopyable</a></div><div class="ttdoc">Utility class that makes any derived class non-copyable.</div><div class="ttdef"><b>Definition</b> <a href="NonCopyable_8hpp_source.html#l00041">NonCopyable.hpp:42</a></div></div>
</div><!-- fragment --><p>Deciding whether the instances of a class can be copied or not is a very important design choice. You are strongly encouraged to think about it before writing a class, and to use <a class="el" href="classsf_1_1NonCopyable.html" title="Utility class that makes any derived class non-copyable.">sf::NonCopyable</a> when necessary to prevent many potential future errors when using it. This is also a very important indication to users of your class. </p>

<p class="definition">Definition at line <a class="el" href="NonCopyable_8hpp_source.html#l00041">41</a> of file <a class="el" href="NonCopyable_8hpp_source.html">NonCopyable.hpp</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2110add170580fdb946f887719da6860" name="a2110add170580fdb946f887719da6860"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2110add170580fdb946f887719da6860">&#9670;&#160;</a></span>NonCopyable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sf::NonCopyable::NonCopyable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor. </p>
<p>Because this class has a copy constructor, the compiler will not automatically generate the default constructor. That's why we must define it explicitly. </p>

<p class="definition">Definition at line <a class="el" href="NonCopyable_8hpp_source.html#l00053">53</a> of file <a class="el" href="NonCopyable_8hpp_source.html">NonCopyable.hpp</a>.</p>

</div>
</div>
<a id="a8274ffbf46014f5f7f364befb52c7728" name="a8274ffbf46014f5f7f364befb52c7728"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8274ffbf46014f5f7f364befb52c7728">&#9670;&#160;</a></span>~NonCopyable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">sf::NonCopyable::~NonCopyable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default destructor. </p>
<p>By declaring a protected destructor it's impossible to call delete on a pointer of <a class="el" href="classsf_1_1NonCopyable.html" title="Utility class that makes any derived class non-copyable.">sf::NonCopyable</a>, thus preventing possible resource leaks. </p>

<p class="definition">Definition at line <a class="el" href="NonCopyable_8hpp_source.html#l00063">63</a> of file <a class="el" href="NonCopyable_8hpp_source.html">NonCopyable.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="NonCopyable_8hpp_source.html">NonCopyable.hpp</a></li>
</ul>
</div><!-- contents -->
        </div>
        <div id="footer-container">
            <div id="footer">
                SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
                Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
                Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
            </div>
        </div>
    </body>
</html>
